Bail out early if we can't find a matching window.
authorRichard Hult <richard@imendio.com>
Tue, 25 Mar 2008 13:49:03 +0000 (13:49 +0000)
committerRichard Hult <rhult@src.gnome.org>
Tue, 25 Mar 2008 13:49:03 +0000 (13:49 +0000)
2008-03-25  Richard Hult  <richard@imendio.com>

* gdk/quartz/gdkevents-quartz.c:
(_gdk_quartz_events_trigger_crossing_events): Bail out early if we
can't find a matching window.

* gdk/quartz/gdkwindow-quartz.c: (show_window_internal): Add a
comment, and only trigger an event for non-temp windows, fixes
problems for tooltips caused by the workarounds for the
problematic tracking rect API.

svn path=/trunk/; revision=19934

ChangeLog
gdk/quartz/gdkevents-quartz.c
gdk/quartz/gdkwindow-quartz.c

index 5159ce7c0f4478074df7e450ea328f0ae364191e..2e70115e12a44634f52a591ee2fc34b07699db9d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2008-03-25  Richard Hult  <richard@imendio.com>
+
+       * gdk/quartz/gdkevents-quartz.c:
+       (_gdk_quartz_events_trigger_crossing_events): Bail out early if we
+       can't find a matching window.
+
+       * gdk/quartz/gdkwindow-quartz.c: (show_window_internal): Add a
+       comment, and only trigger an event for non-temp windows, fixes
+       problems for tooltips caused by the workarounds for the
+       problematic tracking rect API.
+
 2008-03-25  Richard Hult  <richard@imendio.com>
 
        * gdk/quartz/gdkwindow-quartz.c:
index 6d3165220ca15d7fe1e37edb478d3f219a0ed74c..dc7701b6fd14ff94fa8dbd4538375e56e884e270 100644 (file)
@@ -1109,7 +1109,7 @@ _gdk_quartz_events_trigger_crossing_events (void)
   y = _gdk_quartz_window_get_inverted_screen_y (point.y);
 
   mouse_window = _gdk_quartz_window_find_child (_gdk_root, x, y);
-  if (mouse_window == _gdk_root)
+  if (!mouse_window || mouse_window == _gdk_root)
     return;
 
   /* NSMouseEntered always happens on the toplevel. */
index 6aec5e1a4fa606f52a9b2b03a394a1df888af28f..ddf2e81cdcb1920707e85c6e42b8f3aa40fe64d8 100644 (file)
@@ -1137,7 +1137,10 @@ show_window_internal (GdkWindow *window,
   if (impl->transient_for && !GDK_WINDOW_DESTROYED (impl->transient_for))
     _gdk_quartz_window_attach_to_parent (window);
 
-  if (impl->toplevel)
+  /* Create a crossing event for managed windows that pop up under the
+   * mouse. Part of the workarounds for problems with the tracking rect API.
+   */
+  if (impl->toplevel && private->window_type != GDK_WINDOW_TEMP)
     _gdk_quartz_events_trigger_crossing_events ();
 
   GDK_QUARTZ_RELEASE_POOL;